package com.aisino.nmg.operator;

import com.aisino.nmg.ant.task.GeneratorToolTask;
import com.aisino.nmg.task.GeneratorDaoResourceTask;

public class GeneratorProjectResourceOperation {
	private GeneratorToolTask task;

	public GeneratorProjectResourceOperation(GeneratorToolTask task){
		this.task = task;
	}

	public void run(){
		task.cleanGeneratorTask();
		task.addGeneratorTask(task.getEnvironmentTask());
		GeneratorDaoResourceTask daoResourceTask = new GeneratorDaoResourceTask(task);
		task.addGeneratorTask(daoResourceTask);
		task.execute();
	}
}
